package com.caocaog.market.entity;

import com.alibaba.fastjson.annotation.JSONField;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.caocaog.market.entity.dto.PushAPIResultDTO;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;

import java.io.Serializable;
import java.util.Date;
import java.util.List;

/**
 * 推送任务记录
 *
 * @author chechen
 * @date 2022-05-25
 */
@Data
@NoArgsConstructor
@TableName("mk_push_task_record")
@Accessors(chain = true)
@ApiModel(value = "mk_push_task_record对象", description = "推送任务记录")
public class PushTaskRecord implements Serializable {
    private static final long serialVersionUID = 1L;

    @TableId(type = IdType.AUTO)
    @ApiModelProperty("ID")
    private Integer id;

    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
    @ApiModelProperty(value = "创建时间", hidden = true)
    private Date createTime;

    @ApiModelProperty("推送任务id")
    private String taskId;

    @ApiModelProperty("推送消息模版id （推送订单类型）1新订单 2退订单")
    private Integer pushMessageTemplateId;

    @ApiModelProperty("推送目标 推送类型为1、3、6时是cid，为2、4、7时是别名")
    private List<String> target;

    @ApiModelProperty("推送类型 1cid单推 2别名单推 3cid批量单推 4别名批量单推 5创建消息 6cid批量推 7别名批量推")
    private Integer pushType;

    @ApiModelProperty("响应结果")
    private PushAPIResultDTO<?> responseResult;

    @ApiModelProperty("成功与否 0成功")
    private Integer code;

}
